package avicit.bdp.dds.dao.mapper;

import avicit.bdp.common.base.BaseDAO;
import avicit.bdp.dds.dao.entity.Command;
import avicit.bdp.dds.dao.entity.CommandCount;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * command mapper interface
 */
public interface CommandMapper extends BaseDAO<Command> {


    /**
     * get one command
     * @return command
     */
    Command getOneToRun();

    /**
     * count command state
     * @param userId userId
     * @param startTime startTime
     * @param endTime endTime
     * @param projectIdArray projectIdArray
     * @return CommandCount list
     */
    List<CommandCount> countCommandState(
            @Param("userId") String userId,
            @Param("startTime") Date startTime,
            @Param("endTime") Date endTime,
            @Param("projectIdArray") String[] projectIdArray);

	List<Command> findCommandList();



}
